package com.heima.article.utils;


import com.heima.model.common.user.dtos.ApUser;

/**
 * @Author: WDD
 * @Date: 2022/08/02/20:06
 * @Description:
 */
public class AppThreadLocalUtils {

    private final static ThreadLocal WM_THREAD_LOCAL = new ThreadLocal();

    public static void setUser(ApUser apUser) {
        WM_THREAD_LOCAL.set(apUser);
    }

    public static ApUser getUser() {
        return (ApUser) WM_THREAD_LOCAL.get();
    }

    public static void remove() {
        WM_THREAD_LOCAL.remove();
    }
}
